<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="../templates/principal.xhtml">

    <ui:define name="head">
        <script type="text/javascript">
            function handleClienteRequest(xhr, status, args) {
                if (args.validationFailed || !args.loggedIn) {
                    PF('propostaDialog').show();
                } else {
                    PF('propostaDialog').hide();
                }
                PF('propostaDialog').toggleMaximize();
            }


        </script>
    </ui:define>

    <ui:define name="content" id="content">
        <h:form id="frmProposta">
            <p:panel id="panel" header="Bem Vindo a Elaboração da Proposta">
                <p:growl id="messages" life="5000" />

                <p:dataTable id="tabProposta" widgetVar="wtabProposta" var="proposta" value="#{propostaBean.lazyModel}" 
                             lazy="true" paginator="true" rows="12" paginatorPosition="top"
                             emptyMessage="Nenhum Registro Retornado ..." filterEvent="enter" resizableColumns="true">

                    <f:facet name="header">
                        STATUS: 6 - Elaborando a Proposta
                    </f:facet>

                    <p:column headerText="Numero Proposta" sortBy="#{proposta.numProposta}" filterBy="#{proposta.numProposta}">
                        <div style="text-align: left;">
                            <h:outputText value="#{proposta.numProposta}" />
                        </div>
                    </p:column>

                    <p:column headerText="Empreendimento" sortBy="#{proposta.idEmpreendimento.dscEmpreendimento}" filterBy="#{proposta.idEmpreendimento.dscEmpreendimento}">
                        <div style="text-align: left; ">
                            <h:outputText value="#{proposta.idEmpreendimento.dscEmpreendimento}" />
                        </div>
                    </p:column>

                    <p:column headerText="Assunto" sortBy="#{proposta.dscProposta}" filterBy="#{proposta.dscProposta}">
                        <div style="text-align: left; ">
                            <h:outputText value="#{proposta.dscProposta}" />
                        </div>
                    </p:column>

                    <p:column headerText="Empresa" sortBy="#{proposta.idEmpresa.nomEmpresa}" filterBy="#{proposta.idEmpresa.nomEmpresa}">
                        <div style="text-align: left; ">
                            <h:outputText value="#{proposta.idEmpresa.nomEmpresa}" />
                        </div>
                    </p:column>



                    <p:column headerText="Cliente Fantasia/Sobrenome" sortBy="#{proposta.idCliente.nomFantasia}" filterBy="#{proposta.idCliente.nomFantasia}">
                        <div style="text-align: left; ">
                            <h:outputText value="#{proposta.idCliente.nomFantasia}" />
                        </div>
                    </p:column>

                    <p:column style="width:9%;">
                        <h:panelGrid columns="4" styleClass="actions" cellpadding="0">
                            <p:commandButton id="selectButtonProposta" update=":frmProposta:panel :frmProposta:messages" 
                                             icon="ui-icon-search" title="Visualizar // Alterar Proposta" oncomplete="PF('propostaDialog').show(); PF('propostaDialog').toggleMaximize();">
                                <f:setPropertyActionListener value="#{proposta}" target="#{propostaBean.selectedProposta}" />
                                <f:setPropertyActionListener value="#{false}" target="#{propostaBean.ativa}" />
                            </p:commandButton>

                            <p:commandButton id="finalizarButtonProposta" update=":frmProposta:panel :frmProposta:messages" 
                                             icon="ui-icon-note" title="Finalizar Etapa da Proposta" oncomplete="PF('confirmationFinalizar').show();">
                                <f:setPropertyActionListener value="#{proposta}" target="#{propostaBean.selectedProposta}" />
                            </p:commandButton>

                            <p:commandButton id="excluirButtonProposta" update=":frmProposta:panel :frmProposta:messages" 
                                             icon="ui-icon-trash" title="Excluir Proposta" oncomplete="PF('confirmation').show();">
                                <f:setPropertyActionListener value="#{proposta}" target="#{propostaBean.selectedProposta}" />
                            </p:commandButton>
                        </h:panelGrid>
                    </p:column>
                </p:dataTable>

                <!-- DETALHES PROPOSTA -->
                <p:dialog id="dialog" header="Detalhes Proposta" widgetVar="propostaDialog" resizable="true" 
                          onHide="PF('propostaDialogOrgao').hide(); PF('propostaDialog').toggleMaximize();"
                          width="1500" showEffect="explode" hideEffect="explode" style="text-align: left" position="top" maximizable="true">

                    <p:panel id="panelDetalhe" style="text-align: left; ">
                        <p:panelGrid id="display" style="margin-bottom:50px; text-align: left; width: 100%;">

                            <p:row>
                                <p:column>
                                    <h:outputText value="* Numero da Proposta:" />
                                </p:column>
                                <p:column>
                                    <p:inputMask value="#{propostaBean.selectedProposta.numProposta}" mask="999/9999" style="font-weight:bold;" />
                                </p:column>
                                <p:column colspan="2">
                                    <p:commandButton id="selectButtonPropostaOrgao" value="Visualizar Lista de Orgão" update=":frmProposta:panelDetalheOrgao :frmProposta:messages" 
                                                     icon="ui-icon-search" title="Visualizar Lista de Orgão" oncomplete="PF('propostaDialogOrgao').show()" />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="* Assunto:" />
                                </p:column>
                                <p:column colspan="3">
                                    <p:inputText id="inDescricao" value="#{propostaBean.selectedProposta.dscProposta}" readonly="true" maxlength="200" style="width:800px; font-weight:bold; " />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Empresa:" />
                                </p:column>
                                <p:column colspan="3">
                                    <p:inputText id="inEmpresa" value="#{propostaBean.selectedProposta.idEmpresa.nomEmpresa}" readonly="true" maxlength="100" style="width:800px; font-weight:bold; " />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="* Cliente:" />
                                </p:column>
                                <p:column>
                                    <p:inputText id="inCliente" value="#{propostaBean.selectedProposta.idCliente.nomCliente}" 
                                                 readonly="true" style="width:500px; font-weight:bold; " />

                                    <!-- <p:commandButton icon="ui-icon ui-icon-search" title="Pesquisar Cliente" update=":frmProposta:panelCliente" onclick="clienteDialog.show();" /> -->
                                </p:column>
                                <p:column>
                                    <h:outputText value="Empreendimento:" />
                                </p:column>
                                <p:column>
                                    <p:inputText id="inEmpreendimento" value="#{propostaBean.selectedProposta.nomEmpreendimento}" 
                                                 readonly="true" style="width:500px; font-weight:bold; " />
                                </p:column>
                            </p:row>

                            <p:row> 
                                <p:column>
                                    <h:outputText value="Data Proposta:" />
                                </p:column>
                                <p:column colspan="3">
                                    <p:inputMask id="imDatAbert" value="#{propostaBean.selectedProposta.datProposta}" mask="99/99/9999" style="font-weight:bold; ">
                                        <f:convertDateTime type="date" dateStyle="short" pattern="dd/MM/yyyy" />
                                    </p:inputMask>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Modelo Proposta:" />
                                </p:column>
                                <p:column>
                                    <p:inputText id="inModeloProposta" value="#{propostaBean.selectedProposta.dscModelo}" 
                                                 readonly="true" style="width:500px; font-weight:bold; " />

                                    <p:commandButton icon="ui-icon ui-icon-search" title="Pesquisar Modelo de Proposta" update=":frmProposta:panelDetalhe" onclick="PF('modeloPropostaDialog').show();" />
                                </p:column>

                                <p:column>
                                    <p:selectOneRadio id="console" value="#{propostaBean.negrito}" onchange="javascript:insertCurCaret(this.value)">
                                        <f:selectItem itemLabel="Abrir Negrito" itemValue="#B" />
                                        <f:selectItem itemLabel="Fechar Negrito" itemValue="#/B" />
                                        <f:selectItem itemLabel="Limpar" itemValue="" />
                                    </p:selectOneRadio>
                                </p:column>

                                <p:column>
                                    <p:commandButton id="selectButtonContato" update=":frmProposta:panelDetalhe" icon="ui-icon-check" type="button"
                                                     value="#NOME_CONTATO#" title="Clique e Selecione o Contato" onclick="javascript:insertCurCaret('#NOME_CONTATO#')" />
                                    <p:commandButton icon="ui-icon ui-icon-search" title="Pesquisar Contatos da Proposta" update=":frmProposta:panelDetalhe" onclick="PF('contatoPropostaDialog').show();" />
                                    <p:commandButton id="selectButtonAssunto" update=":frmProposta:panelDetalhe" icon="ui-icon-check" type="button"
                                                     value="#ASSUNTO_EMPREENDIMENTO#" title="Clique e Selecione o Assunto" onclick="javascript:insertCurCaret('#ASSUNTO_EMPREENDIMENTO#')" />
                                    <p:commandButton icon="ui-icon ui-icon-search" title="Pesquisar Assunto da Proposta" update=":frmProposta:panelDetalhe" onclick="PF('assuntoPropostaDialog').show();" />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column colspan="4" headerText="Proposta">
                                    <p:inputTextarea autoResize="false" rows="35" id="editorModelo" widgetVar="weditorModelo" value="#{propostaBean.selectedProposta.modelo}" style="width:100%;" />
                                </p:column>
                            </p:row>

                            <f:facet name="footer">
                                <p:row>
                                    <p:column colspan="4">
                                        <p:commandButton value="Gravar" oncomplete="handleClienteRequest(xhr, status, args)" rendered="#{!propostaBean.ativa}"
                                                         icon="ui-icon-disk" actionListener="#{propostaBean.alterar}" />
                                        <p:commandButton icon="ui-icon-closethick" value="Fechar" onclick="PF('propostaDialog').hide();" title="Fecha Janela das Propostas!" />
                                    </p:column>


                                </p:row>
                            </f:facet>
                        </p:panelGrid>
                    </p:panel>
                </p:dialog>

                <!-- EXCLUIR PROPOSTA -->
                <p:dialog header="Confirma a Exclusão dessa Proposta: #{propostaBean.selectedProposta.dscProposta}?" widgetVar="confirmation">

                    <p:commandButton value="Sim" update=":frmProposta:panel :frmProposta:messages" process="@all" oncomplete="PF('confirmation').hide(),PF('propostaDialog').hide()"
                                     actionListener="#{propostaBean.excluir}" />
                    <p:commandButton value="Não" onclick="PF('confirmation').hide();" type="button" />

                </p:dialog>

                <!-- FINALIZAR PROPOSTA -->
                <p:dialog header="Confirma a Finalização dessa Etapa: #{propostaBean.selectedProposta.dscProposta}?" widgetVar="confirmationFinalizar">

                    <p:commandButton value="Sim" update=":frmProposta:panel :frmProposta:messages" process="@all" oncomplete="PF('confirmationFinalizar').hide()"
                                     actionListener="#{propostaBean.finalizarProposta}" />
                    <p:commandButton value="Não" onclick="PF('confirmationFinalizar').hide();" type="button" />

                </p:dialog>

                <!-- PESQUISA MODELO PROPOSTA -->
                <p:dialog id="dialogModeloProposta" header="Pesquisa Modelo Proposta" widgetVar="modeloPropostaDialog" resizable="true"
                          width="1000" showEffect="explode" hideEffect="explode" position="right,top">

                    <p:panel id="panelModeloProposta" style="text-align: left">
                        <p:dataTable id="tabPropostaModelo" widgetVar="wtabPropostaModelo" var="propostaModelo" value="#{propostaModeloBean.lazyModel}" 
                                     paginator="true" rows="15" paginatorPosition="top" emptyMessage="Nenhum Registro Retornado ..." lazy="true" filterEvent="enter">

                            <p:column headerText="Descrição Modelo de Proposta" sortBy="#{propostaModelo.dscModelo}" filterBy="#{propostaModelo.dscModelo}" style="text-align: left">
                                <h:outputText value="#{propostaModelo.dscModelo}" />
                            </p:column>

                            <p:column style="width: 50px;">
                                <p:commandButton id="selectButton" update=":frmProposta:panelDetalhe, :frmProposta:messages" 
                                                 process="@all" icon="ui-icon-search" title="Selecionar Modelo de Proposta" oncomplete="PF('modeloPropostaDialog').hide()">
                                    <f:setPropertyActionListener value="#{propostaModelo}" target="#{propostaBean.selectedPropostaModelo}" />
                                </p:commandButton>

                            </p:column>

                        </p:dataTable>
                    </p:panel>
                </p:dialog>

                <!-- PESQUISA CONTATO PROPOSTA -->
                <p:dialog id="dialogContatoProposta" header="Pesquisa Contatos da Proposta" widgetVar="contatoPropostaDialog" resizable="true"
                          width="1000" showEffect="explode" hideEffect="explode" position="right,top">

                    <p:panel id="panelContatoProposta" style="text-align: left">
                        <p:dataTable id="tabContatoModelo" widgetVar="wtabContatoModelo" var="telefoneModelo" value="#{propostaBean.selectedProposta.idCliente.clienteEnderecoTelefoneList}" 
                                     paginator="true" rows="15" paginatorPosition="top" emptyMessage="Nenhum Registro Retornado ..." lazy="true" filterEvent="enter">

                            <p:column style="width:4%">   
                                <p:rowToggler />
                            </p:column>

                            <p:column headerText="Nome do Contato" sortBy="#{telefoneModelo.dscTelefone}" filterBy="#{telefoneModelo.dscTelefone}" style="text-align: left">
                                <h:outputText value="#{telefoneModelo.dscTelefone}" />
                            </p:column>

                            <p:column headerText="Tipo" sortBy="#{telefoneModelo.dscTipo}" filterBy="#{telefoneModelo.dscTipo}" style="text-align: left">
                                <h:outputText value="#{telefoneModelo.dscTipo}" />
                            </p:column>

                            <p:column headerText="Numero" sortBy="#{telefoneModelo.numTelefone}" filterBy="#{telefoneModelo.numTelefone}" style="text-align: left">
                                <h:outputText value="#{telefoneModelo.idDdi.ddi} - (#{telefoneModelo.idDdd.codigo}) #{telefoneModelo.numTelefone}" />
                            </p:column>

                            <p:rowExpansion>
                                <p:dataTable id="tabClienteTelefoneContato" widgetVar="wtabClienteTelefoneContato" var="clienteTelefoneContato" 
                                             value="#{telefoneModelo.clienteTelefoneContatoList}" paginator="true" rows="3" paginatorPosition="top"
                                             rowIndexVar="rowIdTelefoneContato"  emptyMessage="Nenhum Registro Retornado ..." filterEvent="enter">

                                    <p:column headerText="Nome" sortBy="#{clienteTelefoneContato.nomContato}" filterBy="#{clienteTelefoneContato.nomContato}">
                                        <h:outputText value="#{clienteTelefoneContato.nomContato}" />
                                    </p:column>

                                    <p:column headerText="E-Mail" sortBy="#{clienteTelefoneContato.emailContato}" filterBy="#{clienteTelefoneContato.emailContato}">
                                        <h:outputText value="#{clienteTelefoneContato.emailContato}" />
                                    </p:column>

                                    <p:column headerText="Telefone" sortBy="#{clienteTelefoneContato.numTelefone}" filterBy="#{clienteTelefoneContato.numTelefone}">
                                        <h:outputText value="#{clienteTelefoneContato.numTelefone}" />
                                    </p:column>

                                    <p:column headerText="Ramal" sortBy="#{clienteTelefoneContato.numRamal}" filterBy="#{clienteTelefoneContato.numRamal}">
                                        <h:outputText value="#{clienteTelefoneContato.numRamal}" />
                                    </p:column>

                                    <p:column headerText="Departamento" sortBy="#{clienteTelefoneContato.idDepartamento.dscDepartamento}" filterBy="#{clienteTelefoneContato.idDepartamento.dscDepartamento}">
                                        <h:outputText value="#{clienteTelefoneContato.idDepartamento.dscDepartamento}" />
                                    </p:column>

                                    <p:column style="width: 50px">
                                        <p:commandButton id="selectContatoButton" update=":frmProposta:panelDetalhe, :frmProposta:messages" 
                                                         process="@all" icon="ui-icon-search" title="Selecionar Contato da Proposta" oncomplete="PF('contatoPropostaDialog').hide()">
                                            <f:setPropertyActionListener value="#{clienteTelefoneContato}" target="#{propostaBean.selectedClienteTelefoneContato}" />
                                        </p:commandButton>
                                    </p:column>
                                </p:dataTable>
                            </p:rowExpansion>
                        </p:dataTable>
                    </p:panel>
                </p:dialog>

                <!-- PESQUISA ASSUNTO EMPREENDIMENTO -->
                <p:dialog id="dialogAssuntoProposta" header="Pesquisa Assunto do Empreendimento" widgetVar="assuntoPropostaDialog" resizable="true"
                          width="1000" showEffect="explode" hideEffect="explode" position="right,top">

                    <p:panel id="panelAssuntoProposta" style="text-align: left">
                        <p:dataTable id="tabAssunto" widgetVar="wtabAssunto" var="assunto" value="#{assuntoBean.lazyModel}" 
                                     lazy="true" paginator="true" rows="12" paginatorPosition="top"
                                     emptyMessage="Nenhum Registro Retornado ..." filterEvent="enter">

                            <p:column headerText="Descrição" sortBy="#{assunto.dscAssunto}" filterBy="#{assunto.dscAssunto}">
                                <h:outputText value="#{assunto.dscAssunto}" />
                            </p:column>

                            <p:column style="width: 50px">
                                <p:commandButton id="selectAssuntoButton" update=":frmProposta:panelDetalhe, :frmProposta:messages" 
                                                 process="@all" icon="ui-icon-search" title="Selecionar Assunto do Empreendimento" oncomplete="PF('assuntoPropostaDialog').hide()">
                                    <f:setPropertyActionListener value="#{assunto}" target="#{propostaBean.selectedAssunto}" />
                                </p:commandButton>
                            </p:column>
                        </p:dataTable>
                    </p:panel>
                </p:dialog>

                <!-- DETALHES PROPOSTA - LISTA DE ORGAO -->
                <p:dialog id="dialogOrgao" header="Detalhes Proposta - Preenchimento dos Documentos Necessários" widgetVar="propostaDialogOrgao" resizable="true" dynamic="true" 
                          position="right,top" onHide="PF('propostaDialogOrgao').hide(); propostaDialogOrgao.toggleMaximize();" maximizable="true">

                    <p:panel id="panelDetalheOrgao" style="text-align: left; ">
                        <p:panelGrid id="displayOrgao" style="text-align: left; width: 100%;">

                            <p:row>
                                <p:column colspan="5">
                                    <h:outputText value="Numero Proposta: #{propostaBean.selectedProposta.idProposta}" style="font-weight:bold;" />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Assunto:" />
                                </p:column>
                                <p:column>
                                    <h:outputText id="inDescricaoOrgao" value="#{propostaBean.selectedProposta.dscProposta}" style="width:500px; font-weight:bold; " />
                                </p:column>

                                <p:column>
                                    <h:outputText value="Arquiteto:" />
                                </p:column>
                                <p:column colspan="2">
                                    <h:outputText id="inArquitetoOrgao" value="#{propostaBean.selectedProposta.idEmpreendimento.nomArquiteto}" style="width:300px; font-weight:bold; " />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Cliente:" />
                                </p:column>

                                <p:column>
                                    <h:outputText id="inClienteOrgao" value="#{propostaBean.selectedProposta.idCliente.nomFantasia}" 
                                                  style="width:500px; font-weight:bold; " />
                                </p:column>

                                <p:column>
                                    <h:outputText value="Data Proposta:" />
                                </p:column>

                                <p:column colspan="2">
                                    <h:outputText id="imDatAbertOrgao" value="#{propostaBean.selectedProposta.datProposta}" style="font-weight:bold;">
                                        <f:convertDateTime type="date" dateStyle="short" pattern="dd/MM/yyyy" />
                                    </h:outputText>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Endereços:" />
                                </p:column>

                                <p:column>
                                    <ui:repeat value="#{propostaBean.selectedProposta.idEmpreendimento.empreendimentoEnderecoList}" var="end">
                                        <h:outputText value="#{end.codLogradouro.dscLogradouro}, #{end.numEndereco} #{end.dscComplemento} - " style="font-weight:bold;" />
                                    </ui:repeat>
                                </p:column>

                                <p:column>
                                    <h:outputText value="Cidade:" />
                                </p:column>

                                <p:column colspan="2">
                                    <h:outputText value="#{propostaBean.selectedProposta.idEmpreendimento.empreendimentoEnderecoList.get(0).codLogradouro.codBairro.codCidade.dscCidade}" style="font-weight:bold;" />
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Contribuinte:" />
                                </p:column>

                                <p:column colspan="4">
                                    <ui:repeat value="#{propostaBean.selectedProposta.idEmpreendimento.empreendimentoEnderecoList}" var="end">
                                        <h:outputText value="#{end.numContribuinte} - " style="font-weight:bold;" />
                                    </ui:repeat>
                                </p:column>
                            </p:row>

                            <p:row>
                                <p:column>
                                    <h:outputText value="Protocolado:" />
                                </p:column>

                                <p:column colspan="4">
                                    <h:outputText value="#{propostaBean.selectedProposta.propostaOrgao.dscProtocolado}" style="font-weight:bold;" />
                                </p:column>
                            </p:row>
                        </p:panelGrid>
                        <p:panelGrid id="display1" style="text-align: left; width: 100%;">
                            <f:facet name="header">
                                <p:row>
                                    <p:column colspan="3">ÓRGÃOS</p:column>
                                    <p:column rowspan="2">OBSERVAÇÕES</p:column>
                                </p:row>
                                <p:row>
                                    <p:column colspan="3">SEHAB</p:column>
                                </p:row>
                            </f:facet>

                            <p:row>
                                <p:column style="width: 15%;">
                                    <h:outputText id="options1" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraAprovacao}" style="font-weight:bold;" />
                                </p:column>
                                <p:column colspan="2" style="width: 30%;">ALVARÁ DE APROVAÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs1}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options2" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraExecucao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE EXECUÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs2}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options3" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraTerraplanagem}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE    TERRAPLENAGEM</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs3}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options4" value="#{propostaBean.selectedProposta.propostaOrgao.dsccaieps}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CAIEPS</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs4}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options5" value="#{propostaBean.selectedProposta.propostaOrgao.dscctlu}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CTLU</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs5}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options6" value="#{propostaBean.selectedProposta.propostaOrgao.dscceusoDeclividade}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column rowspan="2">CEUSO</p:column>
                                <p:column>DECLIVIDADE</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs6}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options7" value="#{propostaBean.selectedProposta.propostaOrgao.dscceusoElevacao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column>ELEVAÇÃO TÉRREO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs7}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options8" value="#{propostaBean.selectedProposta.propostaOrgao.dscparsolo}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">PARSOLO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs8}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options9" value="#{propostaBean.selectedProposta.propostaOrgao.dscsmdu}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">SMDU</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs9}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options10" value="#{propostaBean.selectedProposta.propostaOrgao.dscurbanismo}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">SP-URBANISMO (ANTIGA EMURB)</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs10}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options11" value="#{propostaBean.selectedProposta.propostaOrgao.dscsmt}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">SMT</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs11}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options12" value="#{propostaBean.selectedProposta.propostaOrgao.dscsiurbAtinge}" style="font-weight:bold;" />


                                </p:column>
                                <p:column rowspan="2">SIURB</p:column>
                                <p:column>ATINGE</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs12}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options13" value="#{propostaBean.selectedProposta.propostaOrgao.dscsiurbNaoAtinge}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column>NÃO ATINGE</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs13}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options14" value="#{propostaBean.selectedProposta.propostaOrgao.dsciphan}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">IPHAN</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs14}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options15" value="#{propostaBean.selectedProposta.propostaOrgao.dsccondephaat}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CONDEPHAAT</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs15}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options16" value="#{propostaBean.selectedProposta.propostaOrgao.dscconpresp}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CONPRESP</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs16}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options17" value="#{propostaBean.selectedProposta.propostaOrgao.dsccetesp}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">CETESB</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs17}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options18" value="#{propostaBean.selectedProposta.propostaOrgao.dscdepaveLaa}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column rowspan="2">DEPAVE</p:column>
                                <p:column>LAA</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs18}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options19" value="#{propostaBean.selectedProposta.propostaOrgao.dscdepaveTca}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column>TCA</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs19}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options20" value="#{propostaBean.selectedProposta.propostaOrgao.dscsubprefeitura}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">SUBPREFEITURA</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs20}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options21" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraExecucaoDemolicao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE EXECUÇÃO DE DEMOLIÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs21}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options22" value="#{propostaBean.selectedProposta.propostaOrgao.dscautoConclusao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">AUTO DE CONCLUSÃO DE    DEMOLIÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs22}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options23" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraStand}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE STAND DE VENDAS</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs23}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options24" value="#{propostaBean.selectedProposta.propostaOrgao.dscalvaraDesdobro}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ALVARÁ DE DESDOBRO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs24}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options25" value="#{propostaBean.selectedProposta.propostaOrgao.dschabite}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">HABITE-SE</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs25}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options26" value="#{propostaBean.selectedProposta.propostaOrgao.dsclicencaFuncionamento}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">LICENÇA DE FUNCIONAMENTO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs26}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options27" value="#{propostaBean.selectedProposta.propostaOrgao.dscautoRegulizarizacao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">AUTO DE REGULARIZAÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs27}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column colspan="4" styleClass="ui-widget-header">OBSERVAÇÕES</p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options29" value="#{propostaBean.selectedProposta.propostaOrgao.dsccomar}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">COMAR</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs29}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options30" value="#{propostaBean.selectedProposta.propostaOrgao.dscdecont}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">DECONT</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs30}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options31" value="#{propostaBean.selectedProposta.propostaOrgao.dscenvoltorio}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column colspan="2">ENVOLTÓRIO DE VILA</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs31}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options32" value="#{propostaBean.selectedProposta.propostaOrgao.dscmatriculaUnificacao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column rowspan="2">MATRÍCULA</p:column>
                                <p:column>UNIFICAÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs32}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                            <p:row>
                                <p:column><h:outputText id="options33" value="#{propostaBean.selectedProposta.propostaOrgao.dscmatriculaRetificacao}" style="font-weight:bold;" />

                                    <f:selectItem itemLabel="Outro" itemValue="O" />
                                </p:column>
                                <p:column>RETIFICAÇÃO</p:column>
                                <p:column><p:inputTextarea autoResize="false"  value="#{propostaBean.selectedProposta.propostaOrgao.obs33}" style="font-weight:bold; width: 100%; height: 14px;  " /></p:column>
                            </p:row>
                        </p:panelGrid>

                    </p:panel>
                </p:dialog>


            </p:panel>

        </h:form>
    </ui:define>
</ui:composition>